package com.zjx.Service.impl;

import com.zjx.Service.WelcomeService;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

/**
 * @author zjx
 * @create 2020-03-22 17:30
 */
@Service
public class WelcomeServiceImpl implements WelcomeService {
	@Override
	public String sayHello(String name) {
		System.out.println("welcome："+name);
		return "success";
	}

	public static void main(String[] args) {
		List<String> strings = new ArrayList<>();
		strings.add("1");
		strings.add("2");
		strings.add("3");
		List<String> collect =
				strings.stream().
						filter(item -> {
							return item.equals("1");
						}).collect(Collectors.toList());
	}
}
